package com.yunban.project.api.text_check.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
import com.yunban.project.api.text_check.enums.CorrectionModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.lab1024.sa.base.ProjectConstants;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author: lijiajun
 * @date: 2024-11-20
 * @version: 1.0
 */
@Data
@Schema(description = "纠错配置")
@TableName(value = ProjectConstants.TEXT_TABLE_PREFIX + "correction_config", autoResultMap = true)
public class CorrectionConfig implements Serializable {
    @Serial
    private final static long serialVersionUID = 1L;
    private Long id;
    private String name;
    private CorrectionModel code;
    private String appId;
    private String apiKey;
    private String apiSecret;
    private String host;
    private String urlPath;
    private boolean enabled = false;
    @TableField(value = "`order`")
    private int order;
    private String remark;
    private String botId;
    @TableField(typeHandler = Fastjson2TypeHandler.class)
    private List<String> botIds;
    private String promptPrefix;
    private String promptSuffix;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    private String aiModel;
}
